<?php
namespace app\magicboard;
use think\facade\View;

class ArticleTmp
{
    public static function _list($obj=null,\Closure $selfcode=null)
    {
    	self::_common();
    	if($selfcode){
    		return $selfcode();
    	}
    }
    public static function _detail($obj=null,\Closure $selfcode=null){
    	self::_common();
    	if($selfcode){
    		return $selfcode();
    	}
    }
    public static function _common(){
    	$cates = [
    		1=>['id'=>1,'name'=>'新闻'],
    		2=>['id'=>2,'name'=>'科技']
    	];
    	View::assign('cates',$cates);
    }
}
